#!/usr/bin/python
# -*- coding: UTF-8 -*-

"""
Description: TestWrapper

"""
from kptest import log
from kptest.config.enum import HostType, CommandType
from kptest.wrapper.wrapperbase import WrapperBase

from extension.wrapper.kuntaicli import parser


class KtCli(WrapperBase):
    host_types = (HostType.BMC,)
    command_types = (CommandType.BMCSSH, CommandType.SERIALClI)
    modules = [
        "extension.wrapper.kuntaicli.kt_bmc_cli"
    ]

    def __init__(self, _params=None):
        super(KtCli, self).__init__(_params)
        self.logger = log.get_logger(__name__)

    def cli_export_config_local(self):
        # 导出配置文件到/tmp目录
        cmd_str = "ipmcget -t config -d export -v /tmp/config.json"
        cmd = cmd_str.split(" ")
        return [{"cmdline": cmd, "parser": parser.parse_export_config_info}]
